package com.jl15988.chainlog.model;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

/**
 * 链式监控信息
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@ToString(callSuper = true)
public class ChainMethodLog extends BaseChainLog {

    /**
     * 父级监控ID（接口监控ID或上级方法监控ID）
     */
    private String parentId;

    /**
     * 调用层级
     */
    private int level;

    public ChainMethodLog(String id, String parentId, Date startTime) {
        super(id);
        this.parentId = parentId;
        this.setStartTime(startTime);
    }
}